<?
    if (isset($_POST['username']))
    {
        $r = $user->authenticate($_POST['username'], $_POST['password']);
        
        if (!$r)
        {
            $error[] = 'User authentication failed!';
        }
        else
        {
	    if (isset($_POST['remember']))
	    {
		$user->storeLogin();
	    }
            refreshPage('summary', array('login'=>1));            
        }
    }
?>
